package com.itheima.service.impl;

import com.itheima.domain.Patients;
import com.itheima.mapper.PatientsDao;
import com.itheima.service.PatientsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhengjd
 * @date 2020/3/24 20:12
 */
@Service
public class PatientsServiceImpl implements PatientsService {
    @Autowired
    PatientsDao patientsDao;

    @Override
    public int save(Patients patients) {
        int rows = patientsDao.save(patients);
        return rows;
    }

    @Override
    public List<Patients> findAll() {

        return patientsDao.findAll();
    }

    @Override
    public Patients findById(Integer id) {
        return patientsDao.findById(id);
    }

    @Override
    public void update(Patients patients) {
        patientsDao.update(patients);
    }
}
